A cloud computing system mainly includes a cloud application layer, a cloud virtualization layer, and a physical device layer. The cloud virtualization layer creates a virtual machine (VM) according to a physical resource on a physical device layer, and these virtual machines run various applications on the cloud application layer separately or provide services to them. One cloud application may be distributed in one or more virtual machines, and one or more virtual machines corresponding to one cloud application may be grouped into one virtual machine cluster.
Currently, some cluster software exists, for example, a distributed application mainly considers high availability and high reliability of an application, for example, cluster software like Hadoop. Hadoop is capable of performing distributed processing on mass data, and making full use of high speed computing power and storage of a cluster. Hadoop implements a distributed file system Hadoop Distributed File System (HDFS), and can maintain a plurality of working data replicas. For three most common data replication blocks, the principle of the HDFS is that a first replication block is stored in different nodes of a same physical rack, and a last replication block is stored in one node of different physical racks. Because of the request of high reliability and high availability of cluster software, allocating a virtual machine to this type of cluster software to perform service creation, and running a service by the cluster software according to an allocated virtual machine are difficulties during combination of a virtualization technology with the cluster software.
The cluster software is designed based on a physical machine cluster. However, in the virtualization technology, a resource of the virtual machine is flexibly scheduled by a cloud virtualization layer according to a physical resource on a physical device layer. For example, physical resources forming a virtual machine may come from different physical machines on different physical racks. Therefore, the cloud virtualization layer in prior art cannot create a virtual machine meeting a running requirement of cluster software, for example, a distributed application.